//package fun.tan90.wx.pay.statemachine;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.messaging.Message;
//import org.springframework.statemachine.StateContext;
//import org.springframework.statemachine.StateMachine;
//import org.springframework.statemachine.state.State;
//import org.springframework.statemachine.support.StateMachineInterceptor;
//import org.springframework.statemachine.transition.Transition;
//import org.springframework.stereotype.Component;
//
//@Slf4j
//@Component
//public class OrderInterceptor implements StateMachineInterceptor<OrderStatus, OrderEvent> {
//
//    @Override
//    public Message<OrderEvent> preEvent(Message<OrderEvent> message, StateMachine<OrderStatus, OrderEvent> stateMachine) {
//        log.info("preEvent {}", message.getPayload());
//        return message;
//    }
//
//    @Override
//    public void preStateChange(State<OrderStatus, OrderEvent> state, Message<OrderEvent> message, Transition<OrderStatus, OrderEvent> transition, StateMachine<OrderStatus, OrderEvent> stateMachine, StateMachine<OrderStatus, OrderEvent> rootStateMachine) {
//
//    }
//
//    @Override
//    public void postStateChange(State<OrderStatus, OrderEvent> state, Message<OrderEvent> message, Transition<OrderStatus, OrderEvent> transition, StateMachine<OrderStatus, OrderEvent> stateMachine, StateMachine<OrderStatus, OrderEvent> rootStateMachine) {
//
//    }
//
//    @Override
//    public StateContext<OrderStatus, OrderEvent> preTransition(StateContext<OrderStatus, OrderEvent> stateContext) {
//        return null;
//    }
//
//    @Override
//    public StateContext<OrderStatus, OrderEvent> postTransition(StateContext<OrderStatus, OrderEvent> stateContext) {
//        return null;
//    }
//
//    @Override
//    public Exception stateMachineError(StateMachine<OrderStatus, OrderEvent> stateMachine, Exception exception) {
//        return null;
//    }
//}
